import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: () => import('../layouts/MainLayout.vue'),
    redirect: '/dashboard',
    children: [
      {
        path: '/dashboard',
        name: 'Dashboard',
        component: () => import('../views/Dashboard.vue'),
        meta: { title: '仪表盘', icon: 'Odometer' }
      },
      {
        path: '/virtual-scroll',
        name: 'VirtualScroll',
        component: () => import('../views/VirtualScroll.vue'),
        meta: { title: '虚拟滚动', icon: 'List' }
      },
      {
        path: '/threejs',
        name: 'ThreeJS',
        component: () => import('../views/ThreeJS.vue'),
        meta: { title: 'Three.js', icon: 'Box' }
      },
      {
        path: '/tencent-map',
        name: 'TencentMap',
        component: () => import('../views/TencentMap.vue'),
        meta: { title: '腾讯地图', icon: 'Location' }
      },
      {
        path: '/tailwind-demo',
        name: 'TailwindDemo',
        component: () => import('../views/TailwindDemo.vue'),
        meta: { title: 'Tailwind演示', icon: 'Brush' }
      },
      {
        path: '/maze-cat',
        name: 'MazeCat',
        component: () => import('../views/Game/MazeCat.vue'),
        meta: { title: '迷宫猫咪追逐游戏', icon: 'ElemeFilled' }
      },
      {
        path: '/components',
        name: 'Components',
        component: () => import('../views/Components.vue'),
        meta: { title: '组件库', icon: 'Collection' }
      },
      {
        path: '/design',
        name: 'Design',
        component: () => import('../views/design/DesignEditor.vue'),
        meta: { title: '2D场景设计', icon: 'House' }
      },
      {
        path: '/canvas-test',
        name: 'CanvasTest',
        component: () => import('../views/CanvasTest.vue'),
        meta: { title: 'Canvas 测试', icon: 'Monitor' }
      },
      
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 